package com.scau402.system.service;

import java.math.BigDecimal;
import java.util.List;

import com.scau402.common.core.domain.entity.SysUser;
import com.scau402.system.domain.WmsBasicSupplier;
import com.scau402.system.domain.WmsInboundOrder;

/**
 * 商品入库单Service接口
 * 
 * @author ruoyi
 * @date 2023-06-26
 */
public interface IWmsInboundOrderService 
{
    /**
     * 查询商品入库单
     * 
     * @param id 商品入库单主键
     * @return 商品入库单
     */
    public WmsInboundOrder selectWmsInboundOrderById(Long id);


    /**
     * 查询商品入库单列表
     * 
     * @param wmsInboundOrder 商品入库单
     * @return 商品入库单集合
     */
    public List<WmsInboundOrder> selectWmsInboundOrderList(WmsInboundOrder wmsInboundOrder);

    /**
     * 新增商品入库单
     * 
     * @param wmsInboundOrder 商品入库单
     * @return 结果
     */
    public int insertWmsInboundOrder(WmsInboundOrder wmsInboundOrder);

    /**
     * 修改商品入库单
     * 
     * @param wmsInboundOrder 商品入库单
     * @return 结果
     */
    public int updateWmsInboundOrder(WmsInboundOrder wmsInboundOrder);

    /**
     * 批量删除商品入库单
     * 
     * @param ids 需要删除的商品入库单主键集合
     * @return 结果
     */
    public int deleteWmsInboundOrderByIds(Long[] ids);

    /**
     * 删除商品入库单信息
     * 
     * @param id 商品入库单主键
     * @return 结果
     */
    public int deleteWmsInboundOrderById(Long id);

    public String getMaxCode(SysUser user);

    public String getInboundOrderCode(String loginUserTenantCode, String userCode) throws InterruptedException;

    public Long selectWmsInboundOrderIdByOrderCode(String newOrderCode);

    public WmsInboundOrder selectWmsInboundOrderByOrderCode(String orderCode);

    public int checkExists(WmsInboundOrder wmsInboundOrder);

    public boolean checkSupplierExist(Long supplierId, List<WmsBasicSupplier> suppliers);

    public List<WmsInboundOrder> getDetails(List<WmsInboundOrder> list);

    Long getTotalBorrowQuantity(WmsInboundOrder wmsInboundOrder);

    String getNewCode(SysUser user) throws InterruptedException;
}
